package com.yuhang.demo.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yuhang.demo.common.Result;
import com.yuhang.demo.entity.TotalEntity;
import com.yuhang.demo.entity.UserEntity;
import com.yuhang.demo.entity.UserExtendEntity;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

/**
 * 用户表
 *
 * @author yyh
 * @email yyh@demo.com
 * @date 2021-07-15 16:24:33
 */
public interface UserService extends IService<UserEntity> {

    //判断手机号是否重复
    boolean repeatPhone(String phone);

    //登录的方法
    UserEntity login(UserEntity member);

    //判断是否为一个手机号
    Boolean isPhoneNumber(String phone);


    void saveUser(UserEntity user, UserExtendEntity userExtendEntity);

    void saveUser(UserEntity user);

    //批量新增用户
    Boolean saveUserList(MultipartFile file, UserService userService);

    //添加用户
    @Transactional
    Boolean create(TotalEntity totalEntity);

    //修改用户
    @Transactional
    Integer updateUser(TotalEntity totalEntity);

    //删除用户
    Boolean deleteUser(Integer userId);

    //获取任务运行状态
    Boolean getOutValue();
}

